<template>
  <div class="chat-bg">
    <div class="chat-box">
      <el-aside width="20%" class="chat-box-l">
        <el-menu :default-active="activatePath"
          class="el-menu-vertical-demo menu"
          background-color="#333744"
          text-color="#fff"
          active-text-color="#ffd04b"
          router>
          <div class="logo-box">
            <div class="logo">
              <img src="@/assets/img/logo.png" alt="" width="100%" height="100%">
            </div>
          </div>
          <el-menu-item index="/chat/robot">
              <i class="el-icon-chat-dot-round"></i>
              <span slot="title">问答</span>
          </el-menu-item>
          <el-menu-item index="/chat/feedback">
              <i class="el-icon-message"></i>
              <span slot="title">投诉反馈</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main class="right-box">
        <router-view></router-view>
      </el-main>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Chat',
  data () {
    return {
      activatePath: ''
    }
  },
  created () {
    this.activatePath = this.$route.path
  }
}
</script>

<style>
*{
  margin: 0;
  padding: 0;
}

.chat-bg{
  background: rebeccapurple;
  position: relative;
  width: 100%;
  height: 100%;
  background: url('~@/assets/img/chat2.png');
  /* filter: blur(10px); */
  background-size: 100% 120%;
}
.chat-box{
  position: absolute;
  width: 800px;
  height: 600px;
  left: 50%;
  top: 50%;
  border-radius: 5px 5px;
  transform: translate(-50%,-50%);
  overflow: hidden;
  box-shadow:0 0 0 1px hsla(0,0%,100%,.3) inset,0 .5em 1em rgba(0,0,0,0.6);
  background: white;
  display: flex;
}
.chat-box-l{
  overflow: hidden !important;
}
.menu{
  width: 100%;
  height: 100%;
}
.logo-box{
  width: 100%;
  height: 100px;
  position: relative;
}
.logo{
  width: 60px;
  height:60px;
  border-radius: 30px;
  background: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  overflow: hidden;
}
.right-box{
  padding: 0 !important;
}
</style>
